a11y: Do not copy the list of references
authorEmmanuele Bassi <ebassi@gnome.org>
Tue, 10 Nov 2020 14:17:11 +0000 (14:17 +0000)
committerEmmanuele Bassi <ebassi@gnome.org>
Tue, 10 Nov 2020 14:31:56 +0000 (14:31 +0000)
The constructor for GtkReferenceListAccessibleValue is transfer full,
which means we should not be copying the GList around.

Fixes: #3343
gtk/gtkaccessiblevalue.c

index 63cf0321d234ce39fc8c58d6d21ffd9261aae8ad..bc893ae7426961d43cdb1a1d60fbdb2ff596f626 100644 (file)
@@ -569,7 +569,7 @@ gtk_reference_list_accessible_value_new (GList *value)
 
   GtkReferenceListAccessibleValue *self = (GtkReferenceListAccessibleValue *) res;
 
-  self->refs = g_list_copy (value);
+  self->refs = value;
   if (self->refs != NULL)
     {
       for (GList *l = self->refs; l != NULL; l = l->next)